home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
3D World 4 (Spanish)
/
3DWorld_04.iso
/
mac
/
POVRAY-MAC
/
68020 sin coprocesador
/
68K Non-FPU Application
/
POV-Ray 3 Templates
< prev
next >
Wrap
Text File
|
1997-01-29
|
51KB
|
1,755 lines
@com.POV-Ray 3 Macintosh Template file
@com.Version: 3.0.1 beta n1
@com. **** NOTE: Look for "FIXME" string for incomplete sections ****
@com.Last Modified:
@com. [esp] September 27, 1995
@com. [anr] December 28, 1995
@com. [esp] March 18, 1996
@com. [Matt Kruse] April 9, 1996 <mkruse@demian.sau.edu> a few tweaks
@com. [esp] 961021 fixed irid and additional includes
@com. [anr] Januari 29, 1997
@com.------------------------------------------------------------
@com.
@com.============================================================
@mt1.Headers
@com.============================================================
@com.
@com.------------------------------
@mt2.Scene File Header
// Persistence of Vision Ray Tracer Scene Description File
// File: .pov
// Vers: 3
// Desc:
// Date:
// Auth:
@com.------------------------------
@mt2.Standard includes
// ==== Standard POV-Ray Includes ====
#include "colors.inc" // Standard Color definitions
#include "textures.inc" // Standard Texture definitions
@com.------------------------------
@mt2.Additional includes
// ==== Additional Includes ====
// Don't have all of the following included at once, it'll cost memory and time
// to parse!
#include "CHARS.INC" // A complete library of character objects, by Ken Maeno
#include "CONSTS.INC" // Various constants and alias definitions
#include "FINISH.INC" // Some basic finishes
#include "GLASS.INC" // Glass textures
#include "GOLDS.INC" // Gold textures
#include "METALS.INC" // Metallic pigments, finishes, and textures
#include "RAD_DEF.INC" // Some common radiosity settings
#include "SHAPES.INC" // Standard objects from POV-Ray's earlier days
#include "SHAPES2.INC" // Useful, but seldom used shapes
#include "SHAPESQ.INC" // Pre-defined quartic shapes
#include "SKIES.INC" // Ready defined sky spheres
#include "STONES.INC" // Binding include-file for STONES1 and STONES2
#include "STONES1.INC" // Great stone-textures created by Mike Miller
#include "STONES2.INC" // More, done by Dan Farmer and Paul Novak
#include "WOODMAPS.INC" // Basic wooden colormaps
#include "WOODS.INC" // Great wooden textures created by Dan Farmer and Paul Novak
@com.============================================================
@mt1.Statements
@com.============================================================
@com.
@com.------------------------------
@mt2.background
// Set a color of the background (sky)
background { color red 0.1 green 0.3 blue 0.8 }
@com.------------------------------
@mt2.Typical camera
camera
{
location <0.0 , 2.0 ,-5.0>
look_at <0.0 , 0.0 , 0.0>
}
@mt2.Camera definition
// set viewer's position in the scene
camera
{
// (camera types)
// perspective (default) | orthographic | fisheye |
// ultra_wide_angle | omnimax | panoramic | cylinder 1
location <0.0, 1.0, -6.0> // position of camera <X Y Z>
direction 2.0*z // which way are we looking <X Y Z> & zoom
// sky y // rarely used
up y // which way is +up <X Y Z>
right 4/3*x // which way is +right <X Y Z> and aspect ratio
look_at <0.0, 0.0, 0.0> // point center of view at this point <X Y Z>
// angle FLOAT // overrides "direction" with specific angle
// normal { ripples 0.2 } // perturb the camera lens with a pattern
// (focal blur extras)
// aperture 0.2 // 0...N (bigger is narrower depth of field)
// blur_samples 4 // # of rays per pixel
// focal_point <VECTOR> // x,y,z point that is in focus
}
@com.------------------------------
@mt2.Ambient fog
fog
{
fog_type 1
distance 100
color SkyBlue
}
@mt2.Ground fog
fog
{
fog_type 1
distance 10
color Gray
fog_offset 0.1
fog_alt 0.2
turbulence 0.8
}
@mt2.Fog definition
//FIXME
// set global atmospheric fog effect in the scene.
// at the fog distance, there will be 63% visibility
fog {
fog_type 1 // 1=constant, 2=ground_fog
distance 10
color Gray
// turbulence <TURBULENCE>
// turb_depth TURB_DEPTH
// omega OMEGA
// lambda LAMBDA
// octaves OCTAVES
// fog_offset FOG_OFFSET
// fog_alt FOG_ALT
}
@com.------------------------------
@mt2.Rainbow
//FIXME
rainbow {
direction <DIR>
angle ANGLE
width WIDTH
distance DISTANCE
color_map { COLOUR_MAP }
[ jitter JITTER ]
[ up <UP> ]
[ arc_angle ARC_ANGLE ]
[ falloff_angle FALLOFF_ANGLE ]
}
@com.------------------------------
@mt2.Sky Sphere
// Create an infinite sphere around scene and allow any texture on it
sky_sphere
{
pigment
{
gradient y
color_map { [0.0 color blue 0.6] [1.0 color rgb 1] }
}
}
@com.------------------------------
@mt2.adc
global_settings { adc_bailout 20 }
@com.------------------------------
@mt2.assumed gamma
global_settings { assumed_gamma 1.0 }
@com.------------------------------
@mt2.HFGray16
global_settings { HF_Gray_16 }
@com.------------------------------
@mt2.irid_wavelength
global_settings { irid_wavelength <0.25, 0.18, 14> }
@com.------------------------------
@mt2.max_trace_level
global_settings { max_trace_level 20 }
@com.------------------------------
@mt2.max_intersections
global_settings { max_intersections 200 }
@com.------------------------------
@mt2.number_of_waves
global_settings { number_of_waves 10 }
@com.------------------------------
@mt2.ambient light
global_settings { ambient_light { color <COLOR> } }
@com.------------------------------
@mt2.max_intersections
// set the maximum ray tracing intersection depth (1...200) [64]
#max_intersections 64
@com.------------------------------
@mt2.max_trace_level
// set the maximum ray tracing bounce depth (1...20) [5]
#max_trace_level 5
@com.------------------------------
@mt2.version
// Set the language version of POV-Ray. Enables or
// disables syntax features that are version-dependent.
// e.g. #version 1.0, or #version 2.0, etc.
// (Note: This can toggle versions anywhere in the source)
#version 2.0 // use POV-Ray 2.0 syntax
@com.
@com.============================================================
@mt1.Animation
@com.============================================================
@com.
@com.------------------------------
@mt2.clock
// FIXME-fill in an example with clock
@com.
@com.============================================================
@mt1.Expressions
@com.============================================================
@com.
@com.------------------------------
@mt2.Built-in Ids
// These identifiers are built in to POV-Ray, ready to use
// #declare pi = 3.1415926535897932384626
// #declare true = 1
// #declare yes = 1
// #declare on = 1
// #declare false = 0
// #declare no = 0
// #declare off = 0
// #declare u = <1,0>
// #declare v = <0,1>
// #declare x = <1,0,0>
// #declare y = <0,1,0>
// #declare z = <0,0,1>
// #declare t = <0,0,0,1>
@com.------------------------------
@mt2.Math Operators
// () * / + - !
#declare MyResult = -2*B + (A*A - 4)
@mt2.Relational Operators
// Relationals must be within parentheses
// Return arithmetic value 0 for false or 1 for true
// < <= = != >= >
#declare BallColor = pigment { red (clock > 0.5) } // black or red
@com.------------------------------
@mt2.Vector components
// extract each component of a vector:
// #if (MyVector.x > 5) ...
// #if (MyVector.y > 5) ...
// #if (MyVector.z > 5) ...
// #if (MyVector.t > 5) ...
@com.------------------------------
@mt2.Strings
/* various string operations
asc(S1) // Convert 1st character of S1 to ASCII value
chr(A) // Convert extended ASCII value A to a 1 character string
concat(S1,S2) // combine S1 and S2 into one long string
file_exists(S1): Search current and include directories for existence of file S1 (0 or 1)
str(A,L,P) // Convert float A to string, at least L characters long,
// with P digits after the decimal point (if P is -1, make max)
strcmp(S1,S2) // compare S1 to S2, return -1, 0, or +1 if S2 is <, =, > than S1
strlen(S1) // Returns # of characters in string S1
strlwr(S1) // Lower case of S1
substr(S1,P,L) // Sub-string from S1, start at position P for length L
strupr(S1) // Upper case of S1
val(S1) // Convert string S1 to float
// some special control characters that can be used within strings
"\a" Bell or alarm, 0x07
"\b" Backspace, 0x08
"\f" Form feed, 0x0C
"\n" New line (line feed) 0x0A
"\r" Carriage return 0x0D
"\t" Horizontal tab 0x09
"\v" Vertical tab 0x0B
"\0" Null 0x00
"\\" Backslash 0x5C
"\'" Single quote 0x27
*/
@com.
@com.============================================================
@mt1.Light sources
@com.============================================================
@com.
@com.------------------------------
@mt2.Point light
// create a regular point light source
light_source
{
0*x // light's position (translated below)
color red 1.0 green 1.0 blue 1.0 // light's color
translate <-20, 40, -20>
}
@com.------------------------------
@mt2.Spotlight
// create a point "spotlight" (conical directed) light source
light_source
{
0*x // light's position (translated below)
color rgb <1,1,1> // light's color
spotlight // this kind of light source
translate <40, 80, -40> // <x y z> position of light
point_at <0, 0, 0> // direction of spotlight
radius 5 // hotspot (inner, in degrees)
tightness 50 // tightness of falloff (1...100) lower is softer, higher is tighter
falloff 8 // intensity falloff radius (outer, in degrees)
}
@com.------------------------------
@mt2.Cylindrical light
// create a point "spotlight" (cylindrical directed) light source
light_source
{
0*x // light's position (translated below)
color rgb <1,1,1> // light's color
spotlight // this kind of light source
cylinder // this variation
translate <40, 80, -40> // <x y z> position of light
point_at <0, 0, 0> // direction of spotlight
radius 5 // hotspot (inner, in degrees)
tightness 50 // tightness of falloff (1...100) lower is softer, higher is tighter
falloff 8 // intensity falloff radius (outer, in degrees)
}
@com.------------------------------
@mt2.looks_like
// light_source { ...
// put this inside a light_source to give it a visible appearance
looks_like { sphere { 0*x, 5 pigment { Yellow } } }
@com.------------------------------
@mt2.area light
// An area light (creates soft shadows)
// WARNING: This special light can significantly slow down rendering times!
light_source
{
0*x // light's position (translated below)
color rgb 1.0 // light's color
// <widthVector> <heightVector> nLightsWide mLightsHigh
area_light
<8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z)
4, 4 // total number of lights in grid (4x*4z = 16 lights)
adaptive 0 // 0,1,2,3...
jitter // adds random softening of light
translate <40, 80, -40> // <x y z> position of light
}
@com.------------------------------
@mt2.light definition
/*
light_source
{
<CENTER>
color <COLOUR>
[ spotlight ]
[ cylinder ]
[ point_at <POINT> ]
[ radius RADIUS ]
[ falloff FALLOFF ]
[ tightness TIGHTNESS ]
[ area_light <AXIS1>, <AXIS2>, SIZE1, SIZE2 ]
[ adaptive ADAPTIVE ]
[ jitter JITTER ]
[ looks_like { OBJECT } ]
[ fade_distance FADE_DISTANCE ]
[ fade_power FADE_POWER (1...2) ]
[ atmospheric_attenuation BOOL ]
[ shadowless ]
}
*/
@com.
@com.============================================================
@mt1.Misc. Directives
@com.============================================================
@com.
@com.------------------------------
@mt2.atmosphere
//FIXME
/*
#declare ISOTROPIC_SCATTERING = 1
#declare MIE_HAZY_SCATTERING = 2
#declare MIE_MURKY_SCATTERING = 3
#declare RAYLEIGH_SCATTERING = 4
#declare HENYEY_GREENSTEIN_SCATTERING = 5
atmosphere {
type SCATTERING_TYPE
distance DISTANCE
[ scattering SCATTERING ]
[ eccentricity ECCENTRICITY ]
[ samples SAMPLES ]
[ jitter JITTER ]
[ aa_threshold AA_THRESHOLD ]
[ aa_level AA_LEVEL ]
[ color <COLOUR> ]
}
*/
// Atmosphere with Mie scattering, murky atmosphere (dependent on incident light).
atmosphere
{
type 3 // Mie scattering
samples 20 // Number of samples in first distance interval
distance 20 // Atmosphere density, similar to fog
scattering 1.5 // Reflectivity of atmosphere, determines brightness
aa_level 8 // Level of binary subdivision in case of aa
aa_threshold 0.1 // Threshold for aa to push in
jitter 0.2 // Amount of sample jittering
}
@com.------------------------------
@mt2.declare
#declare MyColor = color red 0.7 green 0.5 blue 0.3
@com.------------------------------
@mt2.default
// sets the default texture that objects get when they have no texture specified
#default
{
texture { pigment {color red 1} finish{ambient 0.2} }
}
@com.------------------------------
@mt2.if
#if (expr)
#else
#end
@com.------------------------------
@mt2.if example
#if (High_Quality)
// This section is parsed if High_Quality is true
#end // End of conditional part
// or you can use the else clause too
#if (clock > 2)
// This section is parsed if clock is > 2
#else
// This section is parsed if clock is <= 2
#end // End of conditional part
@com.------------------------------
@mt2.ifdef
#ifdef (ident)
#else
#end
@com.------------------------------
@mt2.ifdef example
#ifdef (SphereFlake_Shape)
// This section is parsed if SphereFlake_Shape is declared
#else
// This section is parsed if SphereFlake_Shape is NOT declared
#declare SphereFlake_Shape = sphere {0,1} // make a default shape
#end // End of conditional part
@com.------------------------------
@mt2.switch
#switch (expr)
#case (expr)
#break
#case (expr,expr)
#break
#else
#end
@com.------------------------------
@mt2.switch example
// Let's make some constant names
#declare CS_Easy = 1
#declare CS_Medium = 3
#declare CS_Hard = 5
// Let the user choose the method to use
#declare Complexity_Switch = CS_Medium // or CS_Easy or CS_Hard
// Do something dependent on the user's choice
#switch (Complexity_Switch)
#case (CS_Easy)
// This statement is done if (Complexity_Switch = CS_Easy)
#declare MyShape = box{-1,+1}
#break // end of CS_Easy
#case (CS_Medium, CS_Hard)
// This statement is done if Complexity_Switch is CS_Medium
// or CS_Hard or anything in between
#declare MyShape = torus{1, 0.5}
#break // end of CS_Hard
#else
// This statement is done if none of the above match
#declare MyShape = sphere{0,1}
#end
@com.------------------------------
@mt2.while
// Create 10 balls along X axis, from 0 to 9
#declare BallCount = 0
#while (BallCount < 10)
sphere
{
<BallCount,0,0>, // NOTE: <0,0,0>, <1,0,0>, <2,0,0>, etc.
0.5
}
#declare BallCount = BallCount+1 // increment our counter
#end
@com.------------------------------
@mt2.Messages
#debug "During scene parsing, general info message"
#fatal "During scene parsing, display and force POV-Ray to stop"
#render "After scene parsing, about to render"
#statistics "After scene frame is rendered"
#warning "During scene parsing"
#end
@com.------------------------------
@mt2.version
#declare Temp_Vers = version // Save original value of #version
#version 2.0 // Change to 1.0 mode
// Version 2.0 stuff goes here ...
#version Temp_Vers // Restore original #version value
@com.
@com.============================================================
@mt1.Shapes
@com.============================================================
@com.
@com.------------------------------
@mt2.bicubic_patch
// 3D curved FINITE (no CSG) surface created from a mesh of triangles
bicubic_patch
{
type 1 // patch_type (0..1)
// 0 = Bezier patch, just store the triangular vertices
// 1 = Bezier patch, store all plane equations defined by
// the triangulation of the patch into sub patches
// (faster, uses more memory)
flatness 0.1 // flatness value
// flatness_value = 0.0 to 1.0, with higher values
// giving flatter, less smooth results
u_steps 3 // # of triangles to subdivide (1-5)
v_steps 3 // # of triangles to subdivide (1-5)
<0, 0, 2> <1, 0, 0> <2, 0, 0> <3, 0, -2>
<0, 1, 0> <1, 1, 0> <2, 1, 0> <3, 1, 0>
<0, 2, 0> <1, 2, 0> <2, 2, 0> <3, 2, 0>
<0, 3, 2> <1, 3, 0> <2, 3, 0> <3, 3, -2>
}
@com.------------------------------
@mt2.box
// create a box that extends between the 2 specified points
box
{
<-1, -1, -1> // one corner position <X1 Y1 Z1>
< 1, 1, 1> // other corner position <X2 Y2 Z2>
}
@com.------------------------------
@mt2.blob
// create a smooth blobby shape
#declare StrengthVal = 1.0 // (+ or -) strength of component's radiating density
#declare RadiusVal = 1.0 // (0 < RadiusVal) outer sphere of influence on other components
blob
{
// threshold (0.0 < threshold <= StrengthVal) surface falloff threshold #
threshold 0.6
sphere { < 0.75, 0, 0>, StrengthVal, RadiusVal }
sphere { <-0.375, 0.65, 0>, StrengthVal, RadiusVal }
sphere { <-0.375, -0.65, 0>, StrengthVal, RadiusVal }
cylinder { -z, +z, 0.1, StrengthVal, RadiusVal }
// [sturm]
scale 2
}
@com.------------------------------
@mt2.cone
// clipped conical shape
// cone { <END1>, RADIUS1, <END2>, RADIUS2 [open] }
// Where <END1> and <END2> are vectors defining the x,y,z
// coordinates of the center of each end of the cone
// and RADIUS1 and RADIUS2 are float values for the radii
// of those ends. open, if present, cone is hollow, else capped
cone
{
1*y, 0.0,
-1*y, 1.0
// open
}
@com.------------------------------
@mt2.cubic
// create a 3rd order infinite polynomial surface
cubic
{
<
// x^3, x^2y, x^2z, x^2,
0, 0, 0, 0,
// xy^2, xyz, xy, xz^2,
0, 0, 0, 0,
// xz, x, y^3, y^2z,
0, 0, 0, 0,
// y^2, yz^2, yz, y,
0, 0, 0, 0,
// z^3, z^2, z, C
0, 0, 0, 0
>
sturm // optional, slower but reduces speckles
}
@mt2.cylinder
// Capped Cylinder, closed [or open ended]
// cylinder { <END1>, <END2>, RADIUS [open] }
// END1 = coord of one end of cylinder
// END2 = coord of other end
// RADIUS = size of cylinder
// open = if present, cylinder is hollow, else capped
cylinder
{
0*x, 3*x, 1
// open
}
@com.------------------------------
@mt2.disc
// flat circular FINITE (no CSG) shape, center hole cutout is optional
disc
{
<0, 1, 0> // center position
z, // normal vector
1.0, // outer radius
0.2 // optional hole radius
}
@com.------------------------------
@mt2.fractal
// create a 3-D slice of a 4-D julia fractal object
julia_fractal
{
<-0.083,0.0,-0.83,-0.025>
quaternion // hypercomplex?
cube // TYPE: sqr cube
max_iteration 8
precision 20 // 10...500? FIXME
// slice xx?
}
@com.------------------------------
@mt2.height_field
// uses image color index as height, extends along X-Z axes
// from <0 0 0> to <1 1 1>
height_field
{
gif // the file type to read (gif/tga/pot/pgm/ppm/png/sys)
"plasma3.gif" // the file name to read
// inverse | texture {...}
// [smooth] // make smoother surface
// [water_level N] // truncate/clip below N (0.0 ... 1.0)
// translate VECTOR | rotate VECTOR | scale VECTOR
}
@com.------------------------------
@mt2.height_field+imagemap
// uses image color index as height, extends along X-Z axes
// from <0 0 0> to <1 1 1>
height_field
{
gif "plasma3.gif"
texture
{
pigment
{
image_map { gif "plasma3.gif" map_type 0 interpolate 2 once }
rotate x*90 // lay X-Y image map down onto X-Z height field plane
}
}
}
@com.------------------------------
@mt2.lathe
// rotate a 2-D outline of points around the Y axis to create a 3-D shape
lathe {
linear_spline // linear_spline | quadratic_spline | cubic_spline
5, // number of points
<2, 0>, <3, 0>, <3, 5>, <2, 5>, <2, 0> // the list of <u,v> points
}
@com.------------------------------
@mt2.mesh
// triangle or smooth-triangle mesh FINITE (no CSG) shape
// NOTE: Each triangle can be independently textured,
// remaining triangles get texture at bottom
mesh // box example here
{
/* top side */
triangle { <-2, 2, -2>, <2, 2, -2>, <2, 2, 2> texture { Red } }
triangle { <-2, 2, -2>, <-2, 2, 2>, <2, 2, 2> texture { Red } }
/* bottom side */
triangle { <-2, -2, -2>, <2, -2, -2>, <2, -2, 2> }
triangle { <-2, -2, -2>, <-2, -2, 2>, <2, -2, 2> }
/* left side */
triangle { <-2, -2, -2>, <-2, -2, 2>, <-2, 2, 2> }
triangle { <-2, -2, -2>, <-2, 2, -2>, <-2, 2, 2> }
/* right side */
triangle { <2, -2, -2>, <2, -2, 2>, <2, 2, 2> texture { Green } }
triangle { <2, -2, -2>, <2, 2, -2>, <2, 2, 2> texture { Green } }
/* front side */
triangle { <-2, -2, -2>, <2, -2, -2>, <-2, 2, -2> texture { Blue } }
triangle { <-2, 2, -2>, <2, 2, -2>, <2, -2, -2> texture { Blue } }
/* back side */
triangle { <-2, -2, 2>, <2, -2, 2>, <-2, 2, 2> }
triangle { <-2, 2, 2>, <2, 2, 2>, <2, -2, 2> }
texture
{ // remaining triangles get this texture
pigment { color rgb<0.9, 0.9, 0.9> }
finish { ambient 0.2 diffuse 0.7 }
}
}
@com.------------------------------
@mt2.object
// general purpose enclosing wrapper for a predefined shape
#define MyShape = box {-1,1} // define the shape
object { MyShape } // create an actual object with that shape
object { MyShape translate 3*x} // create another object with that shape
@com.------------------------------
@mt2.plane
// An infinite planar surface
// plane {<A, B, C>, D } where: A*x + B*y + C*z = D
plane
{
y, // <X Y Z> unit surface normal, vector points "away from surface"
-1.0 // distance from the origin in the direction of the surface normal
}
@com.------------------------------
@mt2.polygon
// arbitrary X,Y FINITE (no CSG) shape
// A complex example for a polygon is the letter "P":
polygon
{
12, // number of points
<0, 0>, <0, 6>, <4, 6>, <4, 3>, <1, 3>, <1, 0>, <0, 0>, // list of <u,v> points
<1, 4>, <1, 5>, <3, 5>, <3, 4>, <1, 4>
}
@com.------------------------------
@mt2.polynomial
// create an Nth order infinite polynomial surface
// poly { N <a,b,c...> [sturm] }
// N = order of poly, M terms where M = (N+1)*(N+2)*(N+3)/6
poly
{
5, // order of polynomial (2...7)
<
// x^5, x^4y, x^4z, x^4,
0, 0, 0, 0,
// x^3y^2, x^3yz, x^3y, x^3z^2,
0, 0, 0, 0,
// x^3z, x^3, x^2y^3, x^2y^2z,
0, 0, 0, 0,
// x^2y^2, x^2yz^2, x^2yz, x^2y,
0, 0, 0, 0,
// x^2z^3, x^2z^2, x^2z, x^2,
0, 0, 0, 0,
// xy^4, xy^3z, xy^3, xy^2z^2,
0, 0, 0, 0,
// xy^2z, xy^2, xyz^3, xyz^2,
0, 0, 0, 0,
// xyz, xy, xz^4, xz^3,
0, 0, 0, 0,
// xz^2, xz, x, y^5,
0, 0, 0, 0,
// y^4z, y^4, y^3z^2, y^3z,
0, 0, 0, 0,
// y^3, y^2z^3, y^2z^2, y^2z,
0, 0, 0, 0,
// y^2, yz^4, yz^3, yz^2,
0, 0, 0, 0,
// yz, y, z^5, z^4,
0, 0, 0, 0,
// z^3, z^2, z, C
0, 0, 0, 0
>
sturm // optional, slower but reduces speckles
}
@com.------------------------------
@mt2.prism
// extrude a closed 2-D shape along an axis
prism {
linear_sweep // or conic_sweep for tapering to a point
cubic_spline // linear_spline | quadratic_spline | cubic_spline
-0.5, // height 1
0.5, // height 2
10, // number of points
// the <u,v> points
< 0.2, -1.0>, < 0.2, 0.2>, < 1.0, -0.2>, < 1.0, 0.2>, < 0.2, 1.0>,
<-0.2, 1.0>, <-1.0, 0.2>, <-1.0, -0.2>, <-0.2, 0.2>, <-0.2, -1.0>
// [open]
// [sturm]
}
@com.------------------------------
@mt2.quadric
// create a quadratic (2nd order) infinite polynomial surface
quadric
{
<0, 1, 1> // A x^2 + B y^2 + C z^2 +
<1, 0, 0> // D xy + E xz + F yz +
<0, 3, 0> // G x + H y + I z +
2 // J
sturm // optional, slower but reduces speckles
}
@com.------------------------------
@mt2.quartic
// create a 4th order infinite polynomial surface
quartic
{
<
// x^4, x^3y, x^3z, x^3, x^2y^2,
0, 0, 0, 0, 0,
// x^2yz, x^2y, x^2z^2, x^2z, x^2,
0, 0, 0, 0, 0,
// xy^3, xy^2z, xy^2, xyz^2, xyz,
0, 0, 0, 0, 0,
// xy, xz^3, xz^2, xz, x,
0, 0, 0, 0, 0,
// y^4, y^3z, y^3, y^2z^2, y^2z,
0, 0, 0, 0, 0,
// y^2, yz^3, yz^2, yz, y,
0, 0, 0, 0, 0,
// z^4, z^3, z^2, z, C
0, 0, 0, 0, 0
>
sturm // optional, slower but reduces speckles
}
@com.------------------------------
@mt2.smooth_triangle
// rounded-surface FINITE (no CSG) triangle shape
smooth_triangle
{
< 0, 30, 0> <0, 0.7071, -0.7071> // <Vertex1> <SurfaceNormal1>
< 40, -20, 0> <0, -0.8664, -0.5> // <Vertex2> <SurfaceNormal2>
< 0, 0, 0> <0, -0.5, -0.8664> // <Vertex3> <SurfaceNormal3>
}
@com.------------------------------
@mt2.sphere
// create a sphere shape
sphere
{
<0, 1, 0> // center of sphere <X Y Z>
0.5 // radius of sphere
// scale <1,2,1> // <= Note: Spheres can become ellipses by uneven scaling
}
@com.------------------------------
@mt2.superellispoid
// create a superquadric ellipsoid shape
// As the exponents approach 1.0, the edges get rounder
superellipsoid
{
0.5, // east-west exponent (0.0 ... 1.0)
1.0, // north-south exponent (0.0 ... 1.0)
}
@com.------------------------------
@mt2.Surface of Revolution
// create a Surface of Revolution shape (like lathe, but faster)
surface_of_revolution
{
7, // # of points
<0.000000, 0.000000> // list of <u,v> points
<0.118143, 0.000000>
<0.620253, 0.540084>
<0.210970, 0.827004>
<0.194093, 0.962025>
<0.286920, 1.000000>
<0.468354, 1.033755>
// [open]
}
@com.------------------------------
@mt2.text
// create a TrueType text shape
text
{
ttf // font type (only TrueType format for now)
"crystal.ttf", // Microsoft Windows-format TrueType font file name
"POV-Ray", // the string to create
2, // the extrusion depth
0 // inter-character spacing
}
@com.------------------------------
@mt2.torus
// torus {MAJOR, MINOR} // (in the X-Z plane)
// MAJOR = float value giving the major radius
// MINOR = float specifying the minor radius
// The major radius extends from the center of the hole
// to the mid-line of the rim while the minor radius
// is the radius of the cross-section of the rim.
torus
{
0.8,
0.2
}
@com.------------------------------
@mt2.triangle
// triangular FINITE (no CSG) shape (vertices are endpoints)
triangle
{
<-1, 0, -1> // <Vertex1>
< 1, 0, -1> // <Vertex2>
< 0, 0, 1> // <Vertex3>
}
@com.
@com.============================================================
@mt1.Shape modifiers
@com.============================================================
@com.
@com.------------------------------
@mt2.bounded_by
// set an outer proposed boundary for parent object(s)
// allows the ray-tracer to do a quick check on the Bounding Shape,
// and if outside, it skips checking this object, which can speed
// up overall rendering of complex shapes. Note that this
// is not a 100% guaranteed clipping shape... use the
// clipped_by statement for that.
bounded_by { box { -(x+y+z) +(x+y+z) }
@com.------------------------------
@mt2.clipped_by
// set clipping shape for parent object.
// (parent shape will not extend beyond ClipShape bounds)
clipped_by { sphere { 0*x, 1.0 } }
@com.------------------------------
@mt2.hollow
// allow atmosphere inside shape
hollow
@com.------------------------------
@mt2.no_shadow
// give object no shadow
no_shadow
@com.------------------------------
@mt2.open
// some objects (cylinder, cone, prism, etc.) can have their ends open
open
@com.
@com.============================================================
@mt1.CSG operations
@com.============================================================
@com.
@com.------------------------------
@mt2.difference
// CSG difference, subtract intersections of shapes 2...N from Shape1
difference
{
Shape1 {...} // Start with this shape
Shape2 {...} // This will be "cut out" of Shape1
ShapeN {...} // This will be "cut out" of Shape1
}
@com.------------------------------
@mt2.intersection
// CSG intersection, the common space where all the shapes meet
intersection
{
Shape1 {...}
Shape2 {...}
ShapeN {...}
}
@com.------------------------------
@mt2.inverse
// flip an object's inside and outside for intersect/difference
intersection
{
Shape1 {...}
Shape2 {... inverse }
}
@com.------------------------------
@mt2.merge
// CSG merge, merge all of shapes 1...N
// like “union”, but melted together so no overlap seam lines inside
merge
{
Shape1 {...}
Shape2 {...}
ShapeN {...}
}
@com.------------------------------
@mt2.union
// CSG union, add all of shapes 1...N
union
{
Shape1 {...}
Shape2 {...}
ShapeN {...}
}
@com.
@com.============================================================
@mt1.Transformations
@com.============================================================
@com.
@mt2.matrix
// Matrix is an object transformation that does rotation about the Y axis,
// shear along the Y axis, and translation along the Y axis
matrix
<
0.886, 0.5, 0.5,
0, 1, 0,
0.5, 0, -0.886,
0, 1.5, 0
>
@com.------------------------------
@mt2.rotate
// rotate shape or texture around <0 0 0>, relative to current orientation
// example: rotate 30*x
rotate <45, 45, 0> // <dX dY dZ> (in degrees)
@com.------------------------------
@mt2.scale
// "resize" an object or texture relative to its current size
// example: scale 2.0
scale <1.0, 2.0, 1.0> // <dX dY dZ>
@com.------------------------------
@mt2.translate
// Move object or texture relative to current position
// example: translate -5.0*z
translate <2.0, 4.0, -1.0> // <dX dY dZ>
@com.------------------------------
@mt2.Transform
// object/texture transformation
// do a predeclared translate/rotate/scale combo
// e.g.:
#declare Leaf_Orientation = transform { scale 4.0 rotate 30*z translate 2*y }
transform Leaf_Orientation // transform an object
@com.
@com.============================================================
@mt1.Textures A-M
@com.============================================================
@com.
@com.------------------------------
@mt2.Texture Definition
/*
texture
{
TEXTURE_IDENTIFIER
pigment {
PIGMENT_IDENTIFIER
PATTERN_TYPE
PIGMENT_MODIFIERS
TRANSFORMATIONS...
}
normal {
NORMAL_IDENTIFIER
NORMAL_PATTERN_TYPE
NORMAL_MODIFIERS
TRANSFORMATIONS...
}
finish {
FINISH_IDENTIFIER
[ ambient AMBIENT | <AMBIENT> ]
[ diffuse DIFFUSE ]
[ brilliance BRILLIANCE ]
[ phong PHONG ]
[ phong_size PHONG_SIZE ]
[ specular SPECULAR ]
[ roughness ROUGHNESS ]
[ metallic [ METALLIC ] ]
[ reflection REFLECTION | <REFLECTION> ]
[ refraction REFRACTION ]
[ ior IOR ]
[ caustics CAUSTICS ]
[ fade_distance FADE_DISTANCE ]
[ fade_power FADE_POWER ]
[ irid { thickness THICKNESS turbulence TURBULENCE } ]
[ crand CRAND ]
}
halo {
attenuating | emitting | glowing | dust
[ constant | linear | cubic | poly ]
[ planar_mapping | spherical_mapping | cylindrical_mapping | box_mapping
[ dust_type DUST_TYPE ]
[ eccentricity ECCENTRICITY ]
[ max_value MAX_VALUE ]
[ exponent EXPONENT ]
[ samples SAMPLES ]
[ aa_level AA_LEVEL ]
[ aa_threshold AA_THRESHOLD ]
[ jitter JITTER ]
[ turbulence <TURBULENCE> ]
[ octaves OCTAVES ]
[ omega OMEGA ]
[ lambda LAMBDA ]
[ colour_map COLOUR_MAP ]
[ frequency FREQUENCY ]
[ phase PHASE ]
[ scale <VECTOR> ]
[ rotate <VECTOR> ]
[ translate <VECTOR> ]
}
TRANSFORMATIONS
}
*/
@com.------------------------------
@mt2.texture example
texture
{
pigment
{
marble // some pattern
color_map {[0.1 color red 1] [0.5 color rgb 1]}
turbulence 0.5
scale <1,3,1>// transformations
}
// same pattern for normal and pigment adds weathered bumps
normal
{
marble // some pattern
turbulence 0.5
scale <1,3,1>// transformations
}
finish
{
ambient 0.2
specular 0.6 // shiny
}
}
@com.------------------------------
@mt2.agate pattern
// texture pigment/normal pattern
agate // use an agate-like texture
agate_turb 0.3 // can alter turbulence [1.0]
// color_map {...} // optional color map
@com.------------------------------
@mt2.ambient finish
// texture finish attribute
ambient 0.2 // set ambient surface reflection (0...1) [0.1]
@com.------------------------------
@mt2.attenuation finish
// texture finish attribute
fade_distance 50
fade_power 1 // 1 or 2
@com.------------------------------
@mt2.bozo pattern
// texture pigment/normal pattern
bozo // use color map to swirl colors
// turbulence 0.3
// color_map...
@com.------------------------------
@mt2.brick pattern
// texture pigment/normal pattern
pigment
{
brick color Red, color Gray
<2,1,1> // size of brick
0.2 // width of mortar
}
@com.------------------------------
@mt2.brilliance finish
// texture finish attribute
brilliance 0.5 // tightness of diffuse illumination
@com.------------------------------
@mt2.bumps pattern
// texture pigment/normal pattern
bumps 0.3 // bumpy surface (0...1)
@com.------------------------------
@mt2.caustics finish
// texture finish attribute
caustics 1 // (0...1)
@com.------------------------------
@mt2.checker
// texture pigment/normal pattern
// cube checker pattern, alternates color1 and color2
checker
color red 1 green 1 blue 1
color red 0 green 1 blue 0
@com.------------------------------
@mt2.color
// texture pigment attribute
// RGB values can range from 0.0 (dark) to 1.0 (saturated)
color red 0.5 green 0.5 blue 0.5 // filter 0.8
@com.------------------------------
@mt2.color_map
// texture pigment {} attribute
// create a smooth color gradation map
color_map
{
// [ END_VAL color red R green G blue B filter F transmit T]
[ 0.1 color red 0.0 green 0.0 blue 0.0]
[ 0.3 color red 0.8 green 0.4 blue 0.2]
[ 0.5 color red 0.0 green 0.0 blue 0.0]
[ 0.7 color red 0.0 green 0.0 blue 0.8 filter 0.5]
[ 1.0 color red 0.8 green 0.8 blue 0.8 filter 1.0]
} // color_map
@com.------------------------------
@mt2.crackle pattern
// texture pigment/normal pattern
crackle 0.5 turbulence 0.5
@com.------------------------------
@mt2.crand finish
// texture finish attribute
// randomly speckle the surface
// Note, this is truly random, and looks BAD in animations
crand 0.2
@com.------------------------------
@mt2.dents pattern
// texture pigment/normal pattern
dents 0.6 // dented surface (0...1) [0.0]
@com.------------------------------
@mt2.diffuse finish
// texture finish attribute
diffuse 0.6 // amount of diffuse lighting (0...1) [0.6]
@com.------------------------------
@mt2.finish component
// texture statement
finish { ambient 0.2 specular 0.5 reflection 0.2 }
@com.------------------------------
@mt2.frequency attribute
// texture pigment/normal attribute
frequency 2.0 // oscillation freq. of radial, ripples, waves, etc
@com.------------------------------
@mt2.gradient pattern
// texture pigment/normal pattern
gradient x+y // specify color_map direction(s)
// color_map {...} // requires a color map
@com.------------------------------
@mt2.granite pattern
// texture pigment/normal pattern
granite // create a granite-like texture
// color_map {...} // optional color map
@com.------------------------------
@mt2.halo component
// texture component
halo
{
dust
dust_type 2
constant
spherical_mapping
max_value 1.0
colour_map
{
[ 0 color rgbf <1, 1, 1, 0.0> ]
[ 1 color rgbf <1, 1, 1, 0.1> ]
}
samples 100
aa_level 5
aa_threshold 0.1
jitter 0.8
}
@com.------------------------------
@mt2.hexagon pattern
// texture pigment/normal pattern
// create a hexagonal pattern texture with 3 colors
// hexagons are in the X-Z plane, extending infinitely in Y plane
hexagon
color blue 1
color red 1
color green 1
@com.------------------------------
@mt2.irid finish
// texture finish attribute
irid
{
0.4 // amount of iridescence saturation (0...1) [0]
thickness 0.2
turbulence 0.7
}
@com.------------------------------
@mt2.ior finish
// texture finish attribute
// 1.0=air, 1.33=water, 1.5=glass, 2.4=diamond (see also IOR.INC)
ior 1.3 // index of refraction
@com.------------------------------
@mt2.lambda attribute
// texture pigment/normal attribute
// change surface perturbation property
// makes turbulence more "swirly"
lambda 1.2 // (1.0...5.0) [2.0]
@com.------------------------------
@mt2.leopard pattern
// texture pigment/normal pattern
leopard // create a leopard spotted texture
// color_map {...} // optional color map
@com.------------------------------
@mt2.mandel pattern
// texture pigment/normal pattern
// create a mandelbrot fractal surface in the X-Y plane
mandel 50 // (2...1000) [256]
// scale <...> translate <...> // zoom and move
// color_map {...} // requires a color map
@com.------------------------------
@mt2.marble pattern
// texture pigment/normal pattern
marble // create a marble-like texture
// turbulence 1.0 // should have some!
// color_map {...} // uses a color map
@com.------------------------------
@mt2.metallic finish
// texture finish attribute
// use surface color, not light source color for phong hilights
metallic on // on/off
@com.
@com.============================================================
@mt1.Textures N-Z
@com.============================================================
@com.
@com.------------------------------
@mt2.normal component
// texture component
normal { wrinkles 0.5 scale 0.5 }
@com.------------------------------
@mt2.octaves attribute
// texture pigment/normal attribute
// increases the "folds" in turbulence changes
octaves 3 // (1...10) [6]
@com.------------------------------
@mt2.omega attribute
// texture pigment/normal attribute
// change surface perturbation property
// makes turbulence more "krinkly"
omega 1.2 // (0.0...2.0) [0.5]
@com.------------------------------
@mt2.onion pattern
// texture pigment/normal pattern
onion // create an onion-like concentric circle texture
// color_map {...} // requires a color map
@com.------------------------------
@mt2.phase attribute
// texture pigment/normal attribute
// change the phase of ripples, etc.
// Animation note: As phase DECREASES, ripples move OUTWARD.
phase 0.5
@com.------------------------------
@mt2.phong finish
// texture finish attribute
// add phong hilighting to surface (0...1)
phong 0.8
@com.------------------------------
@mt2.phong_size finish
// texture finish attribute
// set the size of the phong spot (1...250) [40]
// 20=dull rubber, 40=plastic, 200=shiny glass
phong_size 80
@com.------------------------------
@mt2.quick_color attribute
// texture pigment attribute
quick_color green 1 // low-quality quick-render color
@com.------------------------------
@mt2.quilted pattern
// texture pigment/normal pattern
// creates a pattern like a quilt
quilted 0.4 // amount
control0 -1 // lower curvature (-1...1)
control1 1 // upper curvature (-1...1)
@com.------------------------------
@mt2.radial pattern
// texture pigment/normal pattern
// radially projected color_map in X-Z
radial
// frequency 4.0 // increases # of color "spokes"
// color_map ...
@com.------------------------------
@mt2.reflection finish
// texture finish attribute
reflection 0.3 // amount of surface reflection (0...1) [0]
@com.------------------------------
@mt2.refraction finish
// texture finish attribute
// turn this on (1) if using "filter" in pigment colors
refraction 1 // amount of pass-through light (0 or 1) [0]
@com.------------------------------
@mt2.ripples pattern
// texture pigment/normal pattern
ripples 0.5 // make surface ripply (0...1)
@com.------------------------------
@mt2.roughness finish
// texture finish attribute
// alters specular hilighting
roughness 0.01 // 1.0=rough, 0.001=smooth [0.05]
@com.------------------------------
@mt2.specular finish
// texture finish attribute
// Note: size of hilight depends on roughness attribute
specular 0.7 // use specular hilighting on surface (0...1) [0]
@com.------------------------------
@mt2.spiral1 pattern
// texture pigment/normal pattern
spiral1 5
@com.------------------------------
@mt2.spiral2 pattern
// texture pigment/normal pattern
spiral2 5, 0.6
@com.------------------------------
@mt2.spotted pattern
// texture pigment/normal pattern
spotted // create a spotted texture, turbulence has no effect
// color_map {...} // requires a color map
@com.------------------------------
@mt2.turbulence attribute
// texture pigment/normal attribute
// Takes a float or vector, see also octaves, omega, lambda, frequency
turbulence <0, 1, 0.5> // how much to “stir up” the texture (0...1 or more)
@com.------------------------------
@mt2.warp attribute
// texture pigment modifier
warp { turbulence 0.4*x octaves 2 repeat x*2 flip y offset z*0.25 }
@com.------------------------------
@mt2.waves pattern
// texture pigment/normal pattern
// create a wavy surface (also use phase)
waves 0.5
@com.------------------------------
@mt2.wood pattern
// texture pigment/normal pattern
// create a concentric cylindrical wood-like texture,
// grain along Z axis
wood
// turbulence 0.1 // should have some!
// color_map {...} // optional color map
@com.------------------------------
@mt2.wrinkles pattern
// texture pigment/normal pattern
// create a wrinkly surface (0...1 or more)
wrinkles 0.5
@com.------------------------------
@com.
@com.============================================================
@mt1.Texture Colors
@com.============================================================
@com.
@com.------------------------------
@mt2.blue
color blue 1
@com.------------------------------
@mt2.filter
color red 1 filter 1
@com.------------------------------
@mt2.green
color green 1
@com.------------------------------
@mt2.red
color red 1
@com.------------------------------
@mt2.transmit
color green 1 transmit 1
@com.------------------------------
@mt2.rgb
// rgb - Red Green Blue color shortcut
color rgb <0.2, 0.3, 0.4>
@com.------------------------------
@mt2.rgbf
// rgbf - Red Green Blue Filter color shortcut
color rgbf <0.2, 0.3, 0.4, 0.9>
@com.------------------------------
@mt2.rgbft
// rgbft - Red Green Blue Filter Transmit color shortcut
// NOTE: filter + transmit should always equal 1.0
color rgbft <0.5, 0.5, 0.5, 0.4, 0.6>
@com.------------------------------
@mt2.rgbt
// rgbt - Red Green Blue Transmit color shortcut
color rgbt <0.2, 0.3, 0.4, 0.9>
@com.------------------------------
@mt2.color components
// extract each component of a color:
// #if (MyColor.red < 0.5) ...
// #if (MyColor.green < 0.5) ...
// #if (MyColor.blue < 0.5) ...
// #if (MyColor.filter < 0.5) ...
// #if (MyColor.transmit < 0.5) ...
@com.
@com.============================================================
@mt1.Texture Maps
@com.============================================================
@com.
@com.------------------------------
@mt2.bump_map normal
// texture normal {} attribute
// create a texture that has a bumpiness corresponding to color index
// image maps into X-Y plane from <0,0,0> to <1,1,0>
bump_map
{ // uses image color or index as bumpiness
gif "plasma3.gif" // the file to read (iff/gif/tga/png/sys)
map_type 0 // 0=planar, 1=spherical, 2=cylindrical, 5=torus
interpolate 2 // 0=none, 1=linear, 2=bilinear, 4=normalized distance
// [use_color | use_index]
// [once]
bump_size 0.5 // 0...3
} // bump_map
@com.------------------------------
@mt2.image_map pigment
// texture pigment {} attribute
// create a texture that lays an image's colors onto a surface
// image maps into X-Y plane from <0,0,0> to <1,1,0>
image_map
{
gif "plasma3.gif" // the file to read (iff/gif/tga/png/sys)
map_type 0 // 0=planar, 1=spherical, 2=cylindrical, 5=torus
interpolate 2 // 0=none, 1=linear, 2=bilinear, 4=normalized distance
// [filter N V] // N=all or color index # (0...N), V= value (0.0...1.0)
// [transmit N V] // N=all or color index # (0...N), V= value (0.0...1.0)
// [use_color | use_index]
// [once]
} // image_map
@com.------------------------------
@mt2.material_map texture
// texture attribute
// create a texture that maps different textures onto different color indexes
// image maps into X-Y plane from <0,0,0> to <1,1,0>
material_map
{
gif "plasma3.gif" // the file to read (iff/gif/tga/png/sys)
map_type 0 // 0=planar, 1=spherical, 2=cylindrical, 5=torus
interpolate 2 // 0=none, 1=linear, 2=bilinear, 4=normalized distance
// [once]
texture { pigment {wood} } // texture for color index # 0
texture { pigment {granite} } // texture for color index # 1
texture { pigment {agate} } // texture for color index # 2
// etc...
} // material_map
@com.------------------------------
@mt2.tiles texture
// texture component
// create a tiled texture, alternates between 2 full textures
tiles
{
texture // full texture of tile #1
{
pigment { agate scale 0.3 }
finish { ambient 0.2 }
}
tile2
texture // full texture of tile #2
{
pigment { granite }
finish { specular 0.3 reflection 0.2 }
}
}
@com.
@com.============================================================
@mt1.Std colors
@com.============================================================
@com.
@mt2."Colors.inc"
// Standard pre-defined colors
#include "colors.inc"
@com.
@com.============================================================
@mt1.Ready-Made Scenes
@com.============================================================
@com.
@com.------------------------------
@mt2.Basic scene
// Persistence of Vision Ray Tracer Scene Description File
// File: ?.pov
// Vers: 3
// Desc: Basic Scene Example
// Date: mm/dd/yy
// Auth: ?[esp]
//
#version 3
#include "colors.inc"
global_settings
{
assumed_gamma 1.0
}
// ----------------------------------------
camera
{
location <0.0, 0.5, -4.0>
direction 1.5*z
right 4/3*x
look_at <0.0, 0.0, 0.0>
}
sky_sphere
{
pigment
{
gradient y
color_map { [0.0 color blue 0.6] [1.0 color rgb 1] }
}
}
light_source
{
0*x // light's position (translated below)
color red 1.0 green 1.0 blue 1.0 // light's color
translate <-30, 30, -30>
}
// ----------------------------------------
plane { y, -1 pigment {color rgb <0.7,0.5,0.3>}}
sphere { 0.0, 1 texture {pigment {radial frequency 8} finish{specular 1}} }
@com.------------------------------
@mt2.Checkered floor
// Persistence of Vision Ray Tracer Scene Description File
// File: ?.pov
// Vers: 3
// Desc: Checkered Floor Example
// Date: mm/dd/yy
// Auth: ?
//
#version 3
#include "colors.inc"
global_settings
{
assumed_gamma 1.0
}
// ----------------------------------------
camera
{
location <0.0, 0.5, -4.0>
direction 1.5*z
right 4/3*x
look_at <0.0, 0.0, 0.0>
}
sky_sphere
{
pigment
{
gradient y
color_map { [0.0 color blue 0.6] [1.0 color rgb 1] }
}
}
light_source
{
0*x // light's position (translated below)
color red 1.0 green 1.0 blue 1.0 // light's color
translate <-30, 30, -30>
}
// ----------------------------------------
plane
{
y, -1
texture
{
pigment {checker color rgb 1 color blue 1 scale 0.5}
finish {reflection 0.2}
}
}
sphere { 0.0, 1 texture {pigment {radial frequency 8} finish{specular 1}} }
@com.------------------------------
@mt2.Text Fonts
// Persistence of Vision Ray Tracer Scene Description File
// File: ?.pov
// Vers: 3
// Desc: Basic TTF font Example
// Date: mm/dd/yy
// Auth: ?
//
#version 3
global_settings
{
assumed_gamma 1.0
}
// ----------------------------------------
camera
{
location <0.0, 2.0, -6.0>
direction 1.5*z
right 4/3*x
look_at <0.0, 0.0, 0.0>
}
sky_sphere
{
pigment
{
gradient y
color_map { [0.0 color blue 0.6] [1.0 color rgb 1] }
}
}
light_source
{
0*x // light's position (translated below)
color red 1.0 green 1.0 blue 1.0 // light's color
translate <-20, 10, -30>
}
// ----------------------------------------
#declare Text_Tex = texture
{
pigment { granite scale 0.5 }
finish { specular 0.7 }
}
text
{
ttf "crystal.ttf", "Hello",
2, // depth
0 // spacing
texture {Text_Tex}
rotate <0, -20, 0>
translate <-1, 0, -3>
}
text
{
ttf "crystal.ttf", "Virtual World!",
1, // depth
0 // spacing
scale <1, 2, 1> // stretch it taller
texture {Text_Tex}
rotate <0, -30, 0>
translate <-3, 0, 3>
}
plane { y, 0 pigment {color rgb <0.7,0.5,0.3>} }
@com.------------------------------
@mt2.Image Map
// Persistence of Vision Ray Tracer Scene Description File
// File: ?.pov
// Vers: 3
// Desc: Image Map Example
// Date: mm/dd/yy
// Auth: ?
//
#version 3
#include "colors.inc"
global_settings
{
assumed_gamma 1.0
}
// ----------------------------------------
camera
{
location <0.0, 0.0, -4.0>
direction 2*z
right 4/3*x
look_at <0.0, 0.0, 0.0>
}
sky_sphere
{
pigment
{
gradient y
color_map { [0.0 color blue 0.6] [1.0 color rgb 1] }
}
}
light_source
{
0*x // light's position (translated below)
color red 1.0 green 1.0 blue 1.0 // light's color
translate <-30, 30, -30>
}
// ----------------------------------------
plane
{
y, -1
texture
{
pigment {checker color rgb 1 color blue 1 scale 0.5}
finish {reflection 0.2}
}
}
plane
{
z, -1
texture
{
pigment
{
image_map
{
gif "test.gif"
interpolate 2 // smooth it
once // don't tile image, just one copy
filter 0 0.8 // make 1st color mostly transparent
filter 1 0.8 // make 2nd color mostly transparent
}
// transform it to unit-size (-1 to +1)
translate -0.5*(x+y) // center on the origin
scale 2 // make it unit-sized
}
finish {ambient 0.3}
}
}
@com.============================================================
@com.end of file is next
@@@@